package string;
/**
 * static String valueOf(a)
 * 将其它数据类型的数据(a)转换为String类型
 * */
public class ValueOfDemo {
    public static void main(String[] args) {
        int a =1254;
        String s1 = String.valueOf(a);
        System.out.println(s1);


        double a1 = 3.1415926;
        String s2 = String.valueOf(a1);
        System.out.println(s2);


        String b = a+"";//效率低
        System.out.println(b);

    }
}
